home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIDragSessionOS2.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  101 lines

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3.  *
  4.  * The contents of this file are subject to the Mozilla Public License
  5.  * Version 1.1 (the "License"); you may not use this file except in
  6.  * compliance with the License. You may obtain a copy of the License at
  7.  * http://www.mozilla.org/MPL/
  8.  *
  9.  * Software distributed under the License is distributed on an "AS IS" basis,
  10.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11.  * for the specific language governing rights and limitations under the
  12.  * License.
  13.  *
  14.  * The Original Code is the Mozilla OS/2 libraries.
  15.  *
  16.  * The Initial Developer of the Original Code is 
  17.  * Richard L. Walsh <dragtext@e-vertise.com>
  18.  * Portions created by the Initial Developer are Copyright (C) 2003
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *
  23.  * Alternatively, the contents of this file may be used under the terms of
  24.  * either the GNU General Public License Version 2 or later (the "GPL"), or 
  25.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  26.  * in which case the provisions of the GPL or the LGPL are applicable instead
  27.  * of those above. If you wish to allow use of your version of this file only
  28.  * under the terms of either the GPL or the LGPL, and not to allow others to
  29.  * use your version of this file under the terms of the MPL, indicate your
  30.  * decision by deleting the provisions above and replace them with the notice
  31.  * and other provisions required by the GPL or the LGPL. If you do not delete
  32.  * the provisions above, a recipient may use your version of this file under
  33.  * the terms of any one of the MPL, the GPL or the LGPL.
  34.  *
  35.  * ***** END LICENSE BLOCK ***** */
  36.  
  37. /**
  38.  * nsIDragSessionOS2 encapsulates support for OS/2 dragover/drop events,
  39.  * i.e. operations where Mozilla is the target of a drag (nsIDragService
  40.  * handles source operations).  Its public methods correspond to the d&d
  41.  * messages a PM window receives.  Its protected methods recast native
  42.  * data as nsITransferable flavors during drag-enter and drop events.
  43.  *
  44.  * nsIDragSessionOS2 supports these native formats:  WPS Url objects,
  45.  * files, the contents of files (Alt-drop), and text from DragText.
  46.  * Data is presented to Mozilla as URI-text, HTML, and/or plain-text.
  47.  * Only single-item native drops are supported.  If the dropped file
  48.  * or text does not exist yet, nsIDragSessionOS2 will have the source
  49.  * render the data asynchronously.
  50.  */
  51.  
  52. #ifndef nsIDragSessionOS2_h__
  53. #define nsIDragSessionOS2_h__
  54.  
  55. #include "nsISupports.h"
  56.  
  57. #define INCL_PM
  58. #include <os2.h>
  59.  
  60. #define NS_IDRAGSESSIONOS2_IID_STR "bc4258b8-33ce-4624-adcb-4b62bb5164c0"
  61. #define NS_IDRAGSESSIONOS2_IID \
  62.   { 0xbc4258b8, 0x33ce, 0x4624, { 0xad, 0xcb, 0x4b, 0x62, 0xbb, 0x51, 0x64, 0xc0 } };
  63.  
  64. class nsIDragSessionOS2 : public nsISupports
  65. {
  66. public:
  67.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGSESSIONOS2_IID)
  68.  
  69.   /** the dragFlags returned by most public methods fall into two groups */
  70.  
  71.   /** Mozilla's dragover status */
  72.   enum { DND_NONE       = 0 };                                     
  73.   enum { DND_NATIVEDRAG = 1 };                                     
  74.   enum { DND_MOZDRAG    = 2 };                                     
  75.   enum { DND_INDROP     = 4 };                                     
  76.   enum { DND_DRAGSTATUS = DND_NATIVEDRAG | DND_MOZDRAG | DND_INDROP };
  77.  
  78.   /** tasks the caller should perform */
  79.   enum { DND_DISPATCHENTEREVENT = 16 };
  80.   enum { DND_DISPATCHEVENT      = 32 };
  81.   enum { DND_GETDRAGOVERRESULT  = 64 };
  82.   enum { DND_EXITSESSION        = 128 };
  83.  
  84.   NS_IMETHOD DragOverMsg(PDRAGINFO pdinfo, MRESULT &mr, PRUint32* dragFlags) = 0;
  85.   NS_IMETHOD GetDragoverResult(MRESULT& mr) = 0;
  86.   NS_IMETHOD DragLeaveMsg(PDRAGINFO pdinfo, PRUint32* dragFlags) = 0;
  87.   NS_IMETHOD DropHelpMsg(PDRAGINFO pdinfo, PRUint32* dragFlags) = 0;
  88.   NS_IMETHOD ExitSession(PRUint32* dragFlags) = 0;
  89.   NS_IMETHOD DropMsg(PDRAGINFO pdinfo, HWND hwnd, PRUint32* dragFlags) = 0;
  90.   NS_IMETHOD RenderCompleteMsg(PDRAGTRANSFER pdxfer, USHORT usResult, PRUint32* dragFlags) = 0;
  91.  
  92. protected:
  93.   NS_IMETHOD NativeDragEnter(PDRAGINFO pdinfo) = 0;
  94.   NS_IMETHOD NativeDrop(PDRAGINFO pdinfo, HWND hwnd, PRBool* rendering) = 0;
  95.   NS_IMETHOD NativeRenderComplete(PDRAGTRANSFER pdxfer, USHORT usResult) = 0;
  96.   NS_IMETHOD NativeDataToTransferable( PCSZ pszText, PCSZ pszTitle, PRBool isUrl) = 0;
  97. };
  98.  
  99. #endif  // nsIDragSessionOS2_h__
  100.  
  101.